# Maintainer: Peter Cai <peter at typeblog dot net>
# Contributor: qaz <fkxxyz@163.com>

pkgname=netease-cloud-music
pkgver=1.2.1
pkgrel=1
_pkgdate=20190428
pkgdesc="Netease Cloud Music, converted from .deb package"
arch=("x86_64")
url="http://music.163.com/"
license=('custom')
depends=('vlc' 'qcef')
source=(
	"http://d1.music.126.net/dmusic/netease-cloud-music_${pkgver}_amd64_ubuntu_${_pkgdate}.deb"
	"http://music.163.com/html/web2/service.html"
)
md5sums=('1f47c7dc3d9ce46da8099e539ee8a74d'
         'SKIP')

DLAGENTS=("http::/usr/bin/curl -A 'Mozilla' -fLC - --retry 3 --retry-delay 3 -o %o %u")

package() {
  cd ${pkgdir}
  bsdtar -xvf "${srcdir}/data.tar.xz"
  install -Dm755 "opt/netease/netease-cloud-music/netease-cloud-music" \
      "usr/bin/netease-cloud-music"
  rm -r "opt"
  install -Dm644 "${srcdir}/service.html" "usr/share/licenses/$pkgname/license.html"
}
